import React, {Component} from 'react';
import {findDOMNode} from 'react-dom';

import Demo02 from './Demo02';
import Button from './Button';

class Demo03 extends Component {
  constructor (props) {
    super(props);
    this.state = {};
  }
  componentDidMount () {
    // const myComp = this.refs.myComp;
    // console.log(findDOMNode(myComp));
    // const dom = findDOMNode(myComp);
    // const myButton = this.refs.myButton;
    // console.log(myButton);
    const node = findDOMNode(this);
    console.log(node.contains);
  }

  render () {
    return (
      <div>
        <Demo02 ref="myComp"></Demo02>
        <Button text="无状态组件按钮"></Button>
      </div>
    );
  }
}

export default Demo03;
